home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1984 January to June / Ahoy_Magazine_84-Jan-Jun_1984_Double_L.d64 / random files (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  713b  |  23 lines

  1. 10 rem--ahoy--mar issue--random files---prog page 37
  2. 100 open15,8,15,"i"
  3. 110 open5,8,5,"#"
  4. 120 print"[147]entere track,sector(enter 0,0 to end):"
  5. 130 inputt,s
  6. 135 ift=0ands=0then300
  7. 140 ift<1ort>35thenprint"track must be from 1 to 35":goto120
  8. 150 ifs<0ors>20thenprint"sector must be from 0 to 20":goto120
  9. 160 ift>30ands>16thenprint"track"t"contains sectors 0 to 16":goto120
  10. 170 ift>24ands>17thenprint"track"t"contains sectors 0 to 17":goto120
  11. 180 ift>17ands>18thenprint"track"t"contains sectors 0 to 18":goto120
  12. 200 rem ** read data from block **
  13. 210 print#15,"u1:"5;0;t;s
  14. 220 forx=0to255:get#5,a$:poke212,1
  15. 225 ifasc(a$+chr$(0))<32thenpoke212,0:print"";:a$=chr$(asc(a$+chr$(0))+64)
  16. 230 printa$;:poke212,0:print"[146]";:next
  17. 240 poke212,0:print:print"disk status:"
  18. 250 input#15,a,b$,c,d:printa,b$,c,d
  19. 260 print"hit a key to continue"
  20. 270 geta$:ifa$=""then270
  21. 280 goto120
  22. 300 close5:close15
  23.